Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

319
Views
Does props.[Name](value) send the value to the parent in order for it to be used?

Currently following a guide right now to learn React and HTML and I'm at this part where we create a filter drop down and pass the selected item to the parent of it.

In the filter js file I have :

const dateFilterHandler = (event) => {
    props.onChangeFilter(event.target.value);
}

and in the parent file, I have

const [filteredYear, setFilteredYear] = useState('2020')
const filterChangeHandler = selectedYear => {
    setFilteredYear(selectedYear);
};

  const dateFilterHandler = (selectedYear) => {
    console.log("Expenses.js");
    console.log(selectedYear);
  };

Correct me if I'm wrong but is the child code, (filter) taking the value of the drop down and putting it into props, then the parent file is taking dateFilterHandler to use the value that was "lifted" up into it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!